<template>
  <div>
    <!-- 声明式导航 -->
    <router-link :to="{ path: '/home', query: { name: '张三', age: 20 } }"
      >首页</router-link
    >
    <router-link :to="{ name: 'category', params: { name: '李四', age: 18 } }"
      >分类</router-link
    >
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
};
</script>
<style scoped>
</style>